﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using Common;
using AccessToDataEnergyLibrury;
using System.Collections.ObjectModel;



namespace my_project_energyzmem
{
    /// <summary>
    /// Логика взаимодействия для MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        

        AccessToDataEnergyLibrury.AccessDataEnergyLibrury accessDataEnergyLibrury;

        public MainWindow()
        {
            InitializeComponent();
            Login login = new Login();
            if (login.ShowDialog() == DialogResult != true)
            {
                accessDataEnergyLibrury = new AccessToDataEnergyLibrury.AccessDataEnergyLibrury(login.DBtype, login.ConnectionParameters);                
            }
        }
                    /// <summary>
        /// 
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void ActsFuel_btn_Click(object sender, RoutedEventArgs e)
        {
            
        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void ActsMechan_btn_Click(object sender, RoutedEventArgs e)
        {
            
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void ActsPersonel_btn_Click(object sender, RoutedEventArgs e)
        {
            
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void ActsResourcse_btn_Click(object sender, RoutedEventArgs e)
        {
            
        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void ActsWorks_btn_Click(object sender, RoutedEventArgs e)
        {
            
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Address_btn_Click(object sender, RoutedEventArgs e)
        {
            
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Articles_btn_Click(object sender, RoutedEventArgs e)
        {
            
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Employee_btn_Click(object sender, RoutedEventArgs e)
        {
            
        }
        
        /// <summary>
        /// 
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Records_btn_Click(object sender, RoutedEventArgs e)
        {
            
        }
        private void Usersc_btn_Click(object sender, RoutedEventArgs e)
        {
            
        }
        private void grid_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {

        }

        private void DataGrid_MenuIten(object sender, RoutedEventArgs e)
        {
            
        }
        private void Clouse_Window_btn_Click(object sender, RoutedEventArgs e)
        {
            this.Close();
        }

        
        
        //private void Button_Click(object sender, RoutedEventArgs e)
        //{
        //    energyzmemDataSet energyDataSet = new energyzmemDataSet();
        //    int documentID;
        //    DataRow[] bookCopies = energyDataSet.documentation.Select("number_documents");

        //    if (Int32.TryParse(txtlD.Text, out documentID))
        //    {
        //        try
        //        {
        //            grid.ItemsSource = bookCopies;
        //        }
        //        catch
        //        {
        //            // Ошибка подключения к базе данных 
        //            MessageBox.Show("Error contacting database.");
        //        }
        //    }
        //    else
        //    {
        //        MessageBox.Show("Неверный ID.");
        //    }
        //}


        }

    }                               